For drawing an image based on figure data, the edges of a figure are anti-aliased while filling the pixels enclosed by the edge lines. A pixel is the minimum unit for display. Even if a pixel at an edge of a character or figure partly overlaps another character or figure, the entire pixel must be displayed in one color. However, if the pixels at an edge of a figure have the same color or brightness as the inner pixels, stairstep-like lines clearly appear due to jagging. Then, when an edge of a figure runs through a pixel, the area ratio of the figure overlapping the pixel is calculated and the display color of the dot at the edge part is presented in gradation according to the area ratio (see Patent Literature 1). Such a technique is called anti-aliasing.
In a technique of calculating the overlapping rate of a figure in a pixel at an edge, a pixel is divided into, for example, 4×4 subpixels and the fill region is calculated on the basis of subpixel (for example, see Patent Literature 2). The technique described in the Patent Literature 2 includes the density determination procedure (anti-aliasing procedure) in which a specific anti-aliasing filter (for example, a uniform averaging filter) is applied to the pixels one by one from the first one on the scanning line and the area ratio of each pixel is calculated to obtain a gradation value (namely, density).
In another technique, an area ratio is obtained without dividing into subpixels or counting those to be filled (for example, see Patent Literature 3). The technique described in the Patent Literature 3 comprises a continuity information addition means creating vector data forming the outline of a figure and continuity information indicating the continuity to the vector data and adding it to vector information, a pseudo vector generation means generating a pseudo vector from information on intersections between the scanning lines above and below a scan line and the vector data based on the continuity information of the vector data, and an approximate area ratio calculation means calculating the approximate area ratio of an edge pixel using the fractional part of the X-coordinate value or Y-coordinate value of one of the two intersections formed by the pseudo vector passing through the edge pixel.
In a further other technique, for drawing a figure on a frame buffer over which background image data are spread out, an intermediate color between the color of a first pixel in the background in contact with the edge of a figure and the color of a second pixel at the edge of the figure in contact with the first pixel is calculated and retained in an intermediate color retention region. Then, the color of N consecutive pixels along the edge of the figure in the background including the first pixel is replaced by the intermediate color retained in the intermediate color retention region. Here, N is any integer equal to or greater than 2.